<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<!-- 导入主题样式 -->
<link rel="stylesheet" href="public/easyui/themes/default/easyui.css" />
<!-- 导入图标库 -->
<link rel="stylesheet" href="public/easyui/themes/icon.css" />
<link rel="stylesheet" href="public/css/lc-main.css" />
<link rel="stylesheet" href="public/css/zr-app.css" />
<!-- js文件，顺序：jq，easyui，国际化包 -->
<script src="public/js/jquery.min.js"></script>
<script src="public/easyui/jquery.easyui.min.js"></script>
<script src="public/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" charset="utf-8" data-requiremodule="app"src="public/js/app.js"></script>
<script type="text/javascript">
	$(function() {
		var tabs = $("#tabs");
		tabs.tabs({
					tools : [{
								iconCls : 'icon-clear',
								collapsed : false,
								title : '关闭所有选项卡',
								handler : function() {
									closeAll();
								}
							},
							{
								iconCls : 'icon-reload',
								handler : function() {
									$('.panel:visible > .panel-body > iframe')
											.get(0).contentDocument.location
											.reload(true);
								}
							} ]
				});
		/*========================删除所有的tabs的方法=======================================*/
		function openTab(text, url, iconCls) {
			if ($("#tabs").tabs("exists", text)) {
				$("#tabs").tabs("select", text);
			} else {
				var content = "<iframe frameborder=0 scrolling='yes' style='width:100%;height:100%;' src='"
						+ url + "'></iframe>";
				$("#tabs").tabs("add", {
					title : text,
					iconCls : iconCls,
					closable : true,
					content : content
				});
				//获取最后一个tabs 在新加的选项卡后面添加"关闭全部"
				var li = $(".tabs-wrap ul li:last-child");
				$("#close").remove();
				li
						.after("<li id='close'><a class='tabs-inner' href='javascript:void()' onClick='javascript:closeAll()'>关闭全部</a></li>");
			}
		}

		function closeAll() {
			$(".tabs li").each(function(index, obj) {
				//获取所有可关闭的选项卡
				var tab = $(".tabs-closable", this).text();
				$(".easyui-tabs").tabs('close', tab);
			});
			$("#close").remove(); //同时把此按钮关闭
		}
		$("#cw").tree({
			onSelect : function(node) {
				console.log(node.url);
				if (node.url) {
					if (tabs.tabs("exists", node.text)) {
						tabs.tabs("select", node.text)
					} else {
						tabs.tabs("add", {
							title : node.text,
							closable : true,
							href : node.url
						});
					}
				}
			}
		});
		$("#zs").tree({
			onSelect : function(node) {
				console.log(node.url);
				if (node.url) {
					if (tabs.tabs("exists", node.text)) {
						tabs.tabs("select", node.text)
					} else {
						tabs.tabs("add", {
							title : node.text,
							closable : true,
							href : node.url
						});
					}
				}
			}
		});
		$("#jx").tree({
			onSelect : function(node) {
				console.log(node.url);
				if (node.url) {
					if (tabs.tabs("exists", node.text)) {
						tabs.tabs("select", node.text)
					} else {
						tabs.tabs("add", {
							title : node.text,
							closable : true,
							href : node.url
						});
					}
				}
			}
		});
		$("#jy").tree({
			onSelect : function(node) {
				console.log(node.url);
				if (node.url) {
					if (tabs.tabs("exists", node.text)) {
						tabs.tabs("select", node.text)
					} else {
						tabs.tabs("add", {
							title : node.text,
							closable : true,
							href : node.url
						});
					}
				}
			}
		});
		$("#xt").tree({
			onSelect : function(node) {
				console.log(node.url);
				if (node.url) {
					if (tabs.tabs("exists", node.text)) {
						tabs.tabs("select", node.text)
					} else {
						tabs.tabs("add", {
							title : node.text,
							closable : true,
							href : node.url
						});
					}
				}
			}
		});
		$("#showMenu").mouseenter(function(event) {
			// showDiv();//调用显示DIV方法
			$(".sub").toggle();
			$(document).one("click", function() { //对document绑定一个影藏Div方法
				$(".sub").hide();
			});
			event.stopPropagation(); //阻止事件向上冒泡
		});
	});
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north'" style="height: 13%;">
		<div id="top-left">
			<img src="public/images/logo-colored3.png" style="margin-left: 4px; margin-top: 3px; height: 90%;" />
		</div>
		<div id="top-right">
			<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=9" width="500"
				height="60" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">
			</iframe>
			<div id="yes">
				<a id="showMenu" style="display: inline-block;">
					<img src="/upload/${headimg.imagePath}" class="user-image">
					<span style="color: black;">${user.userAccount}</span>
				</a>
			</div>
		</div>
</div>
<div data-options="region:'south',split:false" style="height: 30px; padding: 5px;">
		<span style="margin-left: 20px;">当前用户：${user.userAccount}</span>
		<span style="margin-left: 200px;">版权所有 © 2014-2017株洲中科智能之星韬睿软件学院粤ICP备16028103号-1</span>
		<span style="margin-left: 150px;">版本：v2.1.1_release</span>
</div>
<div data-options="region:'west',title:'导航',split:true,collapsible:true" border="false" style="width: 180px;">
	<div id="aa" class="easyui-accordion" style="width: 300px; height: 200px;" fit="true" border="false">
			<c:forEach items="${menus}" var="list">
				<c:if test="${list.text=='教学管理' }">
					 <div title="教学管理 " data-options="iconCls: 'icon-jiaoxue'" style="padding: 5px;">
						<ul id="jx" class="easyui-tree">
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='班级管理' }">
									<li data-options="url: 'jiaoxue/jx-class-list',iconCls:'icon-class'" fit="true">
										<span>班级管理</span>
									</li>
								</c:if>
							</c:forEach>
							<!-- <li data-options="url: 'jiaoxue/jx-qinshi-list' "><span>寝室管理</span></li> -->
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='作业管理' }">
									<li data-options="iconCls: 'icon-zuoyeguanli'"><span>作业管理</span>
								</c:if>
							</c:forEach>
							<ul>
							<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='阶段管理' }">
										<li data-options="url: 'jiaoxue/jx-jieduan-list',iconCls: 'icon-phase' ">
											<span>阶段管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='章节管理' }">
										<li data-options="url: 'jiaoxue/jx-zhangjie-list',iconCls: 'icon-chapter' ">
											<span>章节管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='题目管理' }">
										<li data-options="url: 'jiaoxue/jx-timu-list',iconCls: 'icon-timu' ">
											<span>题目管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='作业管理列表' }">
										<li data-options="url: 'jiaoxue/jx-zuoye-list',iconCls: 'icon-zuoye'  ">
											<span>作业管理列表</span>
										</li>
									</c:if>
								</c:forEach>
							</ul>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='学生管理' }">
									<li data-options="iconCls: 'icon-studentguanli' "><span>学生管理</span>
								</c:if>
							</c:forEach>
							<ul>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='学生列表管理' }">
										<li data-options="url: 'jiaoxue/jx-student-list',iconCls: 'icon-student'  ">
											<span>学生列表管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='转班管理' }">
										<li data-options="url: 'jiaoxue/jx-zhuanban-list',iconCls: 'icon-zhuanban'   ">
											<span>转班管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='访谈记录管理' }">
										<li data-options="url: 'jiaoxue/jx-fangtan-list',iconCls: 'icon-fangtan'  ">
											<span>访谈记录管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='项目管理' }">
										<li data-options="url: 'jiaoxue/jx-project-list',iconCls: 'icon-project' ">
											<span>项目管理</span>
										</li>
									</c:if>
								</c:forEach>
								<c:forEach items="${menus}" var="list">
									<c:if test="${list.text=='团队管理' }">
										<li data-options="url: 'jiaoxue/jx-team-list',iconCls: 'icon-team' ">
											<span>团队管理</span>
										</li>
									</c:if>
								</c:forEach>
								<!-- <li data-options="url: '' ">
									<span>学习计划管理</span>
								</li> -->
								<!-- <li data-options="url: 'jiaoxue/ht-log-class' "><span>学生日志管

理</span></li>
								<li data-options="url: 'jiaoxue/ht-log-teacher' "><span>老师日志列表

</span></li>
								<li data-options="url: 'jiaoxue/ht-log-publish' "><span>老师添加日志

</span></li> -->
							</ul>
							<%-- <c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='学生统计图' }">
									<li data-options="url: 'jiaoxue/bing',iconCls: 'icon-tongjitu' ">学生统计图</li>
								</c:if>
							</c:forEach> --%>
						</ul>
					</div>
				</c:if>
			</c:forEach>
			<c:forEach items="${menus}" var="list">
				<c:if test="${list.text=='招生管理' }">
					<div title="招生管理 " data-options="iconCls: 'icon-zhaosheng'"
						style="padding: 10px;">
						<ul id="zs">
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='录入学生管理' }">
									<li data-options="url: 'zhaosheng/zs-inputstuinfo',iconCls: 'icon-inputStudent' ">录入学生管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='跟进管理' }">
									<li data-options="url: 'zhaosheng/followlistall',iconCls:'icon-genjin' ">跟进管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='我的跟进管理' }">
									<li data-options="url: 'zhaosheng/zs-followuprecord',iconCls: 'icon-genjin' ">我的跟进管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='我的移交管理' }">
									<li data-options="url: 'zhaosheng/zs-transferass',iconCls:'icon-yijiao' ">我的移交管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='我的签约管理' }">
									<li data-options="url: 'zhaosheng/zs-qianyue-list',iconCls:'icon-qianyue' ">我的签约管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='招生统计管理' }">
									<li data-options="url: 'zhaosheng/zs-zhexian2',iconCls:'icon-zhaoshengTongji' ">招生统计管理</li>
								</c:if>
							</c:forEach>
						</ul>
					</div>
				</c:if>
			</c:forEach>
			<c:forEach items="${menus}" var="list">
				<c:if test="${list.text=='就业管理' }">
					<div title="就业管理" data-options="iconCls: 'icon-jiuye' " style="padding: 10px;">
						<ul id="jy">
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='简历管理' }">
									<li data-options="url:'jiuye/jy-jl-jianli',iconCls:'icon-jianli'">简历管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='面试资料管理' }">
									<li data-options="url:'jiuye/jy-ms-cxziliao',iconCls:'icon-jingyan'">面试资料管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='面试经验资料' }">
									<li data-options="url:'jiuye/jy-ms-cxjingyan',iconCls:'icon-jingyanziliao'">面试经验资料</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='面试经历管理' }">
									<li data-options="url:'jiuye/jy-ms-cxjingli',iconCls:'icon-work'">面试经历管理</li>
								</c:if>
							</c:forEach>
						</ul>
					</div>
				</c:if>
			</c:forEach>
			<c:forEach items="${menus}" var="list">
				<c:if test="${list.text=='财务管理' }">
					<div title="财务管理 " data-options="iconCls: 'icon-caiwu' "
						style="margin: 20px;">
						<ul id="cw">
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='收款管理' }">
									<li data-options="url:'caiwu/cw-shoukuan-list',iconCls:'icon-shou'">收款管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='扶贫管理' }">
									<li data-options="url:'caiwu/cw-fupin-list',iconCls:'icon-fupin'">扶贫管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='退款管理' }">
									<li data-options="url:'caiwu/cw-tuikuan-list',iconCls:'icon-tui'">退款管理</li>
								</c:if>
							</c:forEach>
						<%-- 	<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='统计管理' }">
									<li data-options="url:'caiwu/cw-zhexian',iconCls: 'icon-caiwubaobiao'">统计管理</li>
								</c:if>
							</c:forEach> --%>
						</ul>
					</div>
				</c:if>
			</c:forEach>
			<c:forEach items="${menus}" var="list">
				<c:if test="${list.text=='系统管理' }">
					<div title="系统设置 " data-options="iconCls: 'icon-xitong'"
						style="padding: 10px;">
						<ul id="xt" class="easyui-tree ">
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='部门管理' }">
									<li data-options="url:'xitong/xt-dept-list',iconCls:'icon-dept'">部门管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='用户管理' }">
									<li data-options="url:'xitong/xt-user-list',iconCls:'icon-user'">用户管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='角色管理' }">
									<li data-options="url:'xitong/xt-role-list',iconCls:'icon-role'">角色管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='员工管理' }">
									<li data-options="url:'xitong/xt-emp-list',iconCls: 'icon-emp'">员工管理</li>
								</c:if>
							</c:forEach>
							<c:forEach items="${menus}" var="list">
								<c:if test="${list.text=='权限管理' }">
									<li data-options="url:'xitong/resource',iconCls: 'icon-quanxian'">权限管理</li>
								</c:if>
							</c:forEach>
						</ul>
					</div>
				</c:if>
			</c:forEach>
	</div>
</div>
	<div data-options="region:'center'">
		<div id="tabs" class="easyui-tabs" fit="true" border="false">
			<ul class="sub">
				<li id="userinfos"><img src="public/images/icon-userinfo.png"
					style="margin-top: 5px;" />个人信息</li>
				<li id="updatepass"><img src="public/images/icon-editPass.png"
					style="margin-top: 5px;" />修改密码</li>
				<li id="exsit"><a href="logout"
					onclick="return confirm('确定退出？')"> <img
						src="public/images/icon-tuichu.png" style="margin-top: 5px;" />退出系统
				</a></li>
			</ul>

			<div title="桌面" style="height: 100%">
				<div id="container"
					style="height: 400%; -webkit-tap-highlight-color: transparent; user-select: none; position: relative; background: transparent;"
					_echarts_instance_="ec_1510818956411">
					<div
						style="position: relative; overflow: hidden; width: 400px; height: 448px; padding: 0px; margin: 0px; border-width: 0px; cursor: default;">
						<canvas width="400px" height="448px" data-zr-dom-id="zr_0"
							style="position: absolute; left: -100px; top: 0px; 
			       	 		 height: 848px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
			       	 		 padding: 0px; margin: 0px; border-width: 0px;">
						</canvas>
					</div>
				</div>
				<script type="text/javascript" src="public/js/echarts-all-3.js"></script>
				<script type="text/javascript">
					var dom = document.getElementById("container");
					var myChart = echarts.init(dom);
					var inputstudentCount = ${inputStudentCount}
					var count1 = ${count1}
					var count2 = ${count2}
					var count3 = ${count3}
					var count4 = ${count4}
					var app = {};
					option = null;
					option = {
						title : {
							text : '中科韬睿所有学员',
							subtext : '2010~2017',
							x : 'center'
						},
						tooltip : {
							trigger : 'item',
							formatter : "{a} <br/>{b} : {c} ({d}%)"
						},
						legend : {
							orient : 'vertical',
							left : 'left',
							data : [ '已录入', '已退学', '在读中', '已就业' ]
						},
						series : [ {
							name : '学员情况',
							type : 'pie',
							radius : '55%',
							center : [ '50%', '60%' ],
							data : [ {
								value : inputstudentCount,
								name : '已录入'
							}, {
								value : count2,
								name : '已退学'
							}, {
								value : count1,
								name : '在读中'
							}, {
								value : count4,
								name : '已就业'
							}, {
								value : count3,
								name : '就业中'
							} ],
							itemStyle : {
								emphasis : {
									shadowBlur : 10,
									shadowOffsetX : 0,
									shadowColor : 'rgba(0, 0, 0, 0.5)'
								}
							}
						} ]
					};
					;
					if (option && typeof option === "object") {
						myChart.setOption(option, true);
					}
				</script>
			</div>
		</div>
	</div>
</body>
</html>